<?php


include_once "magic/magic.php";

// 屏蔽错误++++++++------
ini_set("display_errors", "Off");
error_reporting(0);

$magic = new magic(
    array(
        'cache' => false,
        'debug' => true,
    )
);


$magic-> assign('data', 20);
$magic-> assign('min', 10);
$magic-> assign('result', array(
    "a" => "张三1",
    "b" => "李四", 
    "c" => "王五",
    "list" => array(
        "h1" => "h1h1h1",
        "h2" => "h2h2h2"
    )
));
$magic-> assign( 
    "result1", array(
        ["name" => "张三", "age" => "20", "log" => [
            ["date" => "1111"], 
            ["date" => "2222"], 
            ["date" => "3333"]
        ]],
        ["name" => "李四", "age" => "20", "log" => [
            ["date" => "444"], 
            ["date" => "555"], 
            ["date" => "666"]
        ]],
        ["name" => "王五", "age" => "20", "log" => [
            ["date" => "777"], 
            ["date" => "888"], 
            ["date" => "999"]
        ]]
    )
);
$magic-> assign(
    "dir_template", $magic->getConfig("dir_template")
);


$magic->display('index');